/**
 * 
 */
package com.dp.behav.observer;

/**
 * @author Sunaina.Sharma
 * 
 */
public class CurrentConditionDisplay implements Observer {

	private float temperature;
	private float humidity;
	private Subject weatherData;

	CurrentConditionDisplay(Subject subject) {
		this.weatherData = subject;
		weatherData.registerObserver(this);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.dp.behav.observer.Observer#update(float, float)
	 */
	public void update(float temp, float humid) {
		temperature = temp;
		humidity = humid;
		System.out.println("Measurements updated :: Temperature - "
				+ temperature + " Humidity - " + humidity);
	}
}
